#include <cstdio>
#include <cstring>
using namespace std;

#define BUF_SIZE 1024

void ReserveString(char[]);

int main()
{
    char buf[BUF_SIZE];
    scanf(" %s", buf);
    ReserveString(buf);
    printf("%s\n", buf);

    return 0;
}

void ReserveString(char buf[])
{
    int i, j;
    char temp;
    for (i = 0, j = strlen(buf) - 1; i < j; i++, j--) {
        temp = buf[i];
        buf[i] = buf[j];
        buf[j] = temp;
    }
}